/**
 * RectangularPrism extends prism, it contains methods to calculate
 * the volume and surface area of a rectangular prism.
 */
public class RectangularPrism extends Prism {
    //constructor methods
    public RectangularPrism(double w, double h, double d) {
        super.setWidth(w);
        super.setHeight(h);
        super.setDepth(d);
    }
    public RectangularPrism() {
        super.setWidth(0.0);
        super.setHeight(0.0);
        super.setDepth(0.0);
    }
    //mutator methods
    public double calcVolume() {
        return super.getWidth() * super.getHeight() * super.getDepth();
    }
    public double calcSurfaceArea() {
        return 2 * (super.getWidth() * super.getDepth()) + 2 * (super.getDepth() * super.getHeight()) + 2 * (super.getHeight() * super.getWidth());
    }
}